home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2451 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.3 KB

  1. Path: comma.rhein.de!serpens!not-for-mail
  2. From: mlelstv@serpens.rhein.de (Michael van Elst)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Amiga Memory Map Needed!!!
  5. Date: 31 Jan 1996 16:19:26 +0100
  6. Organization: dis-
  7. Message-ID: <4eo19u$e15@serpens.rhein.de>
  8. References: <310495eb@gauss.demon.co.uk> <1109oaw60.alamito@marketgraph.xs4all.nl> <4eisdt$dkn@sunsystem5.informatik.tu-muenchen.de> <4ejjom$na7@serpens.rhein.de> <4elp51$8vn@sunsystem5.informatik.tu-muenchen.de> <4em9d7$6m8@serpens.rhein.de> <4enme0$7as@btmpjg.god.bel.alcatel.be>
  9. NNTP-Posting-Host: serpens.rhein.de
  10.  
  11. barnhoorn@nlev00 () writes:
  12.  
  13. >OK, then I have yet another frequently asked question. In my program, I
  14. >launch a lot of 'threads' (using CreateTask). Why is it that my threads
  15. >can not access the dos.library? Do they need global data, which is available
  16. >for processes, but not for tasks? Obviously...
  17.  
  18. They need local and global data, for example something that determines the
  19. current directory.
  20.  
  21. >Then how can I easily
  22. >modify the CreateTask into a CreateProc?
  23.  
  24. CreateProc always needs some kludges. Use CreateNewProc. That's a 2.0
  25. function that can be used pretty similar to CreateTask.
  26.  
  27. >I once tried CreateProc but nothing happened (I mean, the new process
  28. >did not started to run). Is it that I need to trigger
  29. >the new process by sending it some kind of message?
  30.  
  31. CreateProc create a task that executes code in a code segment. You probably
  32. loaded an existing program with LoadSeg. Normal programs check wether they
  33. are run by a shell. If not (and that's how it looks like when they are started
  34. by CreateProc) then they expect to be started by Workbench and wait for the
  35. WBStartup message.
  36.  
  37. If you make your own code segment it could avoid waiting for a message.
  38.  
  39. With CreateNewProc you do not need an extra code segment. You can create a
  40. process that starts with any routine that you write.
  41.  
  42. This is also possible with CreateProc but you have to create a seglist
  43. manually. But who wants to support 1.3....
  44.  
  45. >In other words: is there a CSAP-FAQ already somewhere?
  46.  
  47. The startup mechanism is described in the RKRM. Since you have a C compiler
  48. you might also want to look at the source of the startup module.
  49.  
  50. Regards,
  51. -- 
  52.                                 Michael van Elst
  53.  
  54. Internet: mlelstv@serpens.rhein.de
  55.                                 "A potential Snark may lurk in every tree."
  56.